"""客户页面"""
from selenium.webdriver.common.by import By

from page.base_page import BasePage


class CustomerPage(BasePage):
    url="/index.php?m=customer"
    #定位器
    btn_add_client_locator = (By.LINK_TEXT, "新建客户")
    caer_locator = (By.LINK_TEXT, "客户关怀")
    contact_locator = (By.LINK_TEXT, "联系人")
    btn_add_contact_locator = (By.XPATH, "/html/body/div[5]/div[2]/div[1]/div/a")
    #方法
    def click_add_client(self):
        #点击添加客户
        self.find_element(self.btn_add_client_locator).click()
    def click_care(self):
        #点击客户关怀
        self.find_element(self.caer_locator).click()
    def click_add_contact(self):
        #点击新增联系人
        self.find_element(self.contact_locator).click()
        self.find_element(self.btn_add_contact_locator).click()


